import {useState,memo} from 'react'
export default function App() {
    const [count, setCount] = useState(123)
    const handleClick = () => {
        setCount(count + 1)
    }
    return (
        <>
            <h1>MemoComponents</h1>
            <button onClick={handleClick}>button</button>
            {count}
            <Children></Children>
        </>
    )
}

const Children = memo(
    function Children() {
    return (
        <>
            <h1>Children</h1>
            {Math.random()}
        </>
    )
})